package com.utils.basejava.concurrent.atomic;

import java.util.concurrent.atomic.AtomicIntegerArray;
import java.util.concurrent.atomic.AtomicLongArray;
import java.util.concurrent.atomic.AtomicReferenceArray;

public class ArrayTest {
	static int[] value = new int[] {1,2,3};
	public static void main(String[] args) {
		
		AtomicIntegerArray aia = new AtomicIntegerArray(value);
		aia.addAndGet(0, 5);
		System.out.println(aia.get(0));
		System.out.println(value[0]);
		System.out.println(aia.compareAndSet(0, 6, 10));
		System.out.println(aia.get(0));

		
		AtomicLongArray ala = new AtomicLongArray(0);
		AtomicReferenceArray ara = new AtomicReferenceArray(args);
	}
}
